-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reformat global fee #2229
Reformat global fee #2229
Conversation
docs/modules/globalfee.md
Outdated
|
||
Note that the required amount of `uatom` in globalfee is overwritten by the amount in minimum-gas-prices. | ||
Also, the `1stake` in minimum-gas-prices is ignored. | ||
Note that the required amounts of `uatom` and `stake` in minimum-gas-prices is are ignored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yaruwangway did I get it right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"1stake" is ignore due to the denom is not in globalfee fee
"uatom" is not ignored, but rather when combining global fee, it is being "merged", so globalfee provides 0.1uatom, while minimum-gas-prices wants 0.2 uatom, so 0.2 uatom is taken to check the paid fees. since this testcase is for bypass msg, only the denom "uatom" is taken to check if the paid fee is zero, if not zero, if the paid fee denom is in "uatom'
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2229 +/- ##
==========================================
+ Coverage 84.76% 85.63% +0.87%
==========================================
Files 21 21
Lines 1483 1455 -28
==========================================
- Hits 1257 1246 -11
+ Misses 181 167 -14
+ Partials 45 42 -3
|
x/globalfee/ante/fee.go
Outdated
// containsOnlyBypassMinFeeMsgs returns true if all the given msgs type are listed | ||
// in the BypassMinFeeMsgTypes of the FeeDecorator. | ||
func (mfd FeeDecorator) containsOnlyBypassMinFeeMsgs(msgs []sdk.Msg) bool { | ||
for _, msg := range msgs { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (coins DecCoins) Validate() error { | ||
switch len(coins) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this Validate
will later refactor to check only positive amount, zero coins are not allowed.
err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) | ||
if err != nil { | ||
// same behavior as in cosmos-sdk | ||
panic(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
Hi, changed the base branch and moved to here #2242 |
Update the code to be more aligned with Go conventions.
Some functions were simplified and renamed but their logic stayed untouched.